﻿<%@ page language="C#" masterpagefile="~/MasterPage.master" autoeventwireup="true" inherits="Mantenedores_MantenedorProductos, App_Web_3o7hsfpa" title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="contenido" Runat="Server">
    <asp:Panel ID="pnlMantenedorProductos" runat="server" Width="100%" GroupingText="Mantenedor de productos">
    <table border="0">
        <tr>
            <td align="right">
                Codigo :</td>
            <td style="text-align: left">
                <asp:TextBox ID="txbCodigo" runat="server" Width="100px"></asp:TextBox>*</td>
            <td style="text-align: left">
                <asp:RequiredFieldValidator ID="rfvCodigo" runat="server" ControlToValidate="txbCodigo"
                    ErrorMessage="Requerido" ValidationGroup="ValidaCampos">Requerido</asp:RequiredFieldValidator></td>
            <td style="text-align: left">
            </td>
        </tr>
        <tr>
            <td align="right">
                Codigo de Barras :&nbsp;</td>
            <td style="text-align: left">
                <asp:TextBox ID="txbCodigoDeBarras" runat="server" Width="100px"></asp:TextBox></td>
            <td style="text-align: left">
            </td>
            <td style="text-align: left">
            </td>
        </tr>
        <tr>
            <td align="right">
                Nombre :</td>
            <td style="text-align: left">
                <asp:TextBox ID="txbNombre" runat="server" Width="100px"></asp:TextBox>*</td>
            <td style="text-align: left">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txbNombre"
                    ErrorMessage="Requerido" ValidationGroup="ValidaCampos">Requerido</asp:RequiredFieldValidator></td>
            <td style="text-align: left">
            </td>
        </tr>
        <tr>
            <td align="right">
                Familia :</td>
            <td style="text-align: left">
                <asp:DropDownList ID="ddlFamilia" runat="server"
                    DataTextField="Nombre" DataValueField="Id" Width="100px">
                </asp:DropDownList>*</td>
            <td style="text-align: left">
                <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="ddlFamilia"
                    ErrorMessage="Seleccione" Operator="NotEqual" ValidationGroup="ValidaCampos"
                    ValueToCompare="0"></asp:CompareValidator></td>
            <td style="text-align: left">
            </td>
        </tr>
        <tr>
            <td align="right">
                Medida :</td>
            <td style="text-align: left">
                <asp:DropDownList ID="ddlMedida" runat="server"
                    DataTextField="Codigo" DataValueField="Id" Width="100px">
                </asp:DropDownList>*</td>
            <td style="text-align: left">
                <asp:CompareValidator ID="CompareValidator2" runat="server" ControlToValidate="ddlMedida"
                    ErrorMessage="Seleccione" Operator="NotEqual" ValidationGroup="ValidaCampos"
                    ValueToCompare="0"></asp:CompareValidator></td>
            <td style="text-align: left">
            </td>
        </tr>
        <tr>
            <td align="right">
                Marca :</td>
            <td style="text-align: left">
                <asp:TextBox ID="txbMarca" runat="server" Width="100px"></asp:TextBox>*</td>
            <td style="text-align: left">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txbMarca"
                    ErrorMessage="Requerido" ValidationGroup="ValidaCampos">Requerido</asp:RequiredFieldValidator></td>
            <td style="text-align: left">
            </td>
        </tr>
        <tr>
            <td align="right">
                Stock Minimo :</td>
            <td style="text-align: left">
                <asp:TextBox ID="txbStockMinimo" runat="server" onChange="intOnly(this);" onKeyUp="intOnly(this);" onKeyPress="intOnly(this);" Width="100px"></asp:TextBox>*</td>
            <td style="text-align: left">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txbStockMinimo"
                    ErrorMessage="Requerido" ValidationGroup="ValidaCampos">Requerido</asp:RequiredFieldValidator></td>
            <td style="text-align: left">
            </td>
        </tr>
        <tr>
            <td align="right">
                Stock Maximo :</td>
            <td style="text-align: left">
                <asp:TextBox ID="txbStockMaximo" runat="server" onChange="intOnly(this);" onKeyUp="intOnly(this);" onKeyPress="intOnly(this);" Width="100px"></asp:TextBox>*</td>
            <td style="text-align: left">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txbStockMaximo"
                    ErrorMessage="Requerido" ValidationGroup="ValidaCampos">Requerido</asp:RequiredFieldValidator></td>
            <td style="text-align: left">
            </td>
        </tr>
        <tr>
            <td align="right">
                Descripcion :</td>
            <td style="text-align: left">
                <asp:TextBox ID="txbDescripcion" runat="server" Height="100%" Rows="3" TextMode="MultiLine"
                    Width="150px"></asp:TextBox></td>
            <td style="text-align: left">
            </td>
            <td style="text-align: left">
            </td>
        </tr>
        <tr>
            <td align="right">
            </td>
            <td colspan="2">
                </td>
            <td colspan="1">
            </td>
        </tr>
        <tr>
            <td align="right" style="text-align: center" colspan="3">
        <asp:Button ID="btnAceptar" runat="server" CssClass="botonNuevo" OnClick="btnAceptar_Click"
            Text="Aceptar" ValidationGroup="ValidaCampos" /><asp:Button ID="btnNuevo" runat="server" CssClass="botonAceptar"
                OnClick="btnNuevo_Click" Text="Nuevo" /><asp:Button ID="btnModificar" runat="server" CssClass="botonModificar" OnClick="btnModificar_Click"
            Text="Modificar" /><asp:Button ID="btnEliminar" runat="server" CssClass="botonEliminar" OnClick="btnEliminar_Click"
            Text="Eliminar" /><asp:Button ID="btnCancelar" runat="server" CssClass="botonCancelar" OnClick="btnCancelar_Click"
            Text="Cancelar" /></td>
            <td align="right" colspan="1" style="text-align: center">
            </td>
        </tr>
        <tr>
            <td align="center" colspan="3" valign="middle">
                <hr />
                </td>
            <td align="center" colspan="1" valign="middle">
            </td>
        </tr>
        <tr>
            <td align="right" colspan="4">
    <asp:GridView ID="gdvProductos" CssClass="GridViewStyle" runat="server" AllowPaging="True" AutoGenerateColumns="False"
        DataKeyNames="Id" DataSourceID="odsProductos" OnSelectedIndexChanged="gdvProductos_SelectedIndexChanged" Width="100%">
        <Columns>
            <asp:BoundField DataField="Codigo" HeaderText="Codigo" SortExpression="Codigo" >
                <ItemStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="Nombre" HeaderText="Nombre" SortExpression="Nombre" >
                <ItemStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="StockMinimo" HeaderText="StockMinimo" SortExpression="StockMinimo" >
                <ItemStyle HorizontalAlign="Right" />
            </asp:BoundField>
            <asp:BoundField DataField="StockMaximo" HeaderText="StockMaximo" SortExpression="StockMaximo" >
                <ItemStyle HorizontalAlign="Right" />
            </asp:BoundField>
            <asp:CommandField ShowSelectButton="True" />
        </Columns>
                <RowStyle CssClass="RowStyle" />
        <PagerStyle CssClass="PagerStyle" />
        <HeaderStyle CssClass="HeaderStyle" />
        <AlternatingRowStyle CssClass="AltRowStyle" />
        <SelectedRowStyle CssClass="SelectedRowStyle" />
    </asp:GridView>
            </td>
        </tr>
    </table>
        <br />
    <asp:ObjectDataSource ID="odsProductos" runat="server" DataObjectTypeName="EYDIngenieria.ERP.ObjetosDeNegocio.Dominio.Producto"
        DeleteMethod="Eliminar" InsertMethod="Agregar" SelectMethod="Listar" TypeName="EYDIngenieria.ERP.Aplicacion.Mantenedores.MantenedorProducto"
        UpdateMethod="Modificar"></asp:ObjectDataSource>
        &nbsp; &nbsp;&nbsp;
        <br />
        <br />
        <br />
    </asp:Panel>
    &nbsp;
    &nbsp;&nbsp;
</asp:Content>

